<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function getEntriesByCategory($catId,$limit=5)
{
    //echo 'Select  title,description,date,images,link from entries left join urls on entries.url_id = urls.id and urls.category_id='.$catId.' order by entries.id desc LIMIT '.$limit;
    $records = dbFetchAll('Select  title,description,date,images,link from entries left join urls on entries.url_id = urls.id where urls.category_id='.$catId.' order by entries.id desc LIMIT '.$limit);
    //echo '<pre>'; print_r($records);
    return $records;
}
?>
